package com.ckx.动物;

public class Dog extends Animal {
    public Dog(String name, int age) {
        super(name, age);
    }

    public void bark() {
        System.out.println(super.name + "正在叫");
    }

    public void eat() {
        System.out.println(this.name + "正在吃狗粮");
    }
//    4,重写的返回值类型构成父子关系
//    public Dog eat(){
//        System.out.println(this.name + "正在吃狗粮");
//        return null;
//    }

}
